import commissionApi from "@/api/declaration/mall/commissionApi"
import httpRequest from "@/config/axios/httpRequest"

// 查询分销用户列表
export const getBrokerageUserPage = async (params: any) => {
  return await httpRequest.get(commissionApi.GetBrokerageUserPage, { params })
}

// 查询分销用户详情
export const getBrokerageUser = async (id: number) => {
  return await httpRequest.get(commissionApi.GetBrokerageUser, { params: { id} })
}

// 修改推广员
export const updateBindUser = async (data: any) => {
  return await httpRequest.put(commissionApi.UpdateBindUser, data)
}

// 清除推广员
export const clearBindUser = async (data: any) => {
  return await httpRequest.put(commissionApi.ClearBindUser, data)
}

// 修改推广资格
export const updateBrokerageEnabled = async (data: any) => {
  return await httpRequest.put(commissionApi.UpdateBrokerageEnabled, data)
}
